package com.dyava.commons.validate;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Collection;
import java.util.Date;

public class ValidateUtils {
	
	
	public static void validate(ValidateAble validateAble ){
		validateAble.validate();
	}

	public static ValidateString validate(String value,String name){
		return new ValidateString(value, name);
	}

	public static ValidateInteger validate(Integer value,String name){
		return new ValidateInteger(value, name);
	}

	public static ValidateLong validate(Long value, String name){
		return new ValidateLong(value, name);
	}

	public static ValidateDouble validate(Double value,String name){
		return new ValidateDouble(value, name);
	}

	public static ValidateFloat validate(Float value,String name){
		return new ValidateFloat(value, name);
	}

	public static ValidateBigDecimal validate(BigDecimal value,String name){
		return new ValidateBigDecimal(value, name);
	}

	public static ValidateDate validate(Date value, String name){
		return new ValidateDate(value,name);
	}

	public static ValidateLocalDateTime validate(LocalDateTime value, String name){
		return new ValidateLocalDateTime(value,name);
	}

	public static ValidateLocalDate validate(LocalDate value, String name){
		return new ValidateLocalDate(value,name);
	}

	public static ValidateLocalTime validate(LocalTime value, String name){
		return new ValidateLocalTime(value,name);
	}

	public static<T> ValidateArray<T> validate(T[] values, String name){
		return new ValidateArray(values,name);
	}

	public static<T,L extends Collection<T>> ValidateCollection<T,L> validate(L values, String name){
		return new ValidateCollection(values,name);
	}

}
